#include <stdio.h>

#define ONE (1<<0) // 1
#define TWO (1<<1) // 2
#define THREE (1<<2) // 4
#define FOUR (1<<3) // 8

// 相当于操作系统给我们提供的一种方法接口
void show(int flags)
{
    if (flags & ONE) printf("hello function1\n");
    if (flags & TWO) printf("hello function2\n");
    if (flags & THREE) printf("hello function3\n");
    if (flags & FOUR) printf("hello function4\n");
}

int main()
{
    printf("\n");
    show(ONE);
    printf("\n");
    show(TWO);
    printf("\n");
    show(ONE | TWO);
    printf("\n");
    show(TWO | THREE | FOUR);
}


